<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">

    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="../bootstrap/css/bootstrap.css" rel="stylesheet">
    <script src="../bootstrap/js/jquery-3.3.1.min.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/header.css">
    <link rel="stylesheet" type="text/css" href="../css/main.css">
    <link rel="stylesheet" type="text/css" href="../css/main2.css">
    <link rel="stylesheet" type="text/css" href="../css/manage.css">
    <link rel="stylesheet" type="text/css" href="../css/footer.css">

    <script src="../js/vue.js"></script>
    <link rel="stylesheet" href="../element/css/index.css">
    <script src="../element/index.js"></script>
    <script src="../js/axios.js"></script>
    <script src="../js/url.js"></script>
    <script src="../js/controller/headerController.js"></script>
    <script src="../js/service/headerService.js"></script>
    <script src="../js/controller/movieController.js"></script>
    <script src="../js/service/movieService.js"></script>

    <script src="../layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="../layui/css/layui.css" media="all">

    <title>后台管理</title>
</head>

<body>
<!-- 导航栏 -->
<div id="header"></div>

<div id="movie-vue">
    <!-- 主体 -->
    <div class="container">
        <div class="contents">
            <div class="nav-next">
                <div class="nav-title">
                    <h3>后台管理</h3>
                </div>
                <a class="cardId" href="user.html">用户管理</a>
                <a class="cardId" href="movie.html">影片管理</a>
                <a class="cardId" href="cinema.html">影院管理</a>
                <a class="cardId" href="hall.html">影厅管理</a>
                <a class="cardId" href="schedule.html">场次管理</a>
                <a class="cardId" href="comment.html">评论管理</a>
                <a class="cardId" href="order.html">订单管理</a>
            </div>
            <div class="nav-body">
                <!-- 电影管理 -->
                <div class="two card">
                    <div>
                        <div class="title">影片管理</div>
                        <hr/>
                    </div>
                    <div class="main-inner" v-show="operateCard=='index'">
                        <div class="addMovie" style="float: left">
                            <img src="../images/addMovie.png" @click="changeOperateCard('add')">
                            <p style="font-size: 20px;position: absolute;bottom: 30px;left: 37px">添加电影</p>
                        </div>
                        <div class="addMovie" style="float: left;margin-left: 50px">
                            <img src="../images/preheatMovie.png" @click="moviePreheat">
                            <p style="font-size: 20px;position: absolute;bottom: 30px;left: 37px">影片预热</p>
                        </div>
                        <div class="movie-grid" style="clear: left">
                            <div class="panel-header">
                                    <span class="panel-title">
                                        <span class="textcolor_red">正在热映（ {{page.total}}部）</span>
                                    </span>
                            </div>
                            <!--分页-->
                            <div style="margin-top: 20px;margin-left: 20%">
                                <el-pagination background @size-change="handleSizeChange"
                                               @current-change="handleCurrentChange" :hide-on-single-page="value"
                                               :current-page="page.pageNum" :page-sizes="pageSizes"
                                               :page-size="page.pageSize"
                                               :pager-count="pagerCount" :total="page.total"
                                               layout="total, sizes, prev, pager, next, jumper">
                                </el-pagination>
                            </div>
                            <div class="panel-content">
                                <ul class="movies-list" v-for="movie in movies">
                                    <li>
                                        <div class="movie-item">
                                            <a href="" target="_blank" data-act="playingMovie-click">
                                                <div class="movie-poster">
                                                    <img :src="movie.moviePicture" onclick="">
                                                    <div class="movie-overlay movie-overlay-bg">
                                                        <div class="movie-info">
                                                            <div class="movie-score">
                                                                <i class="integer">{{movie.movieScore}}</i>
                                                            </div>
                                                            <div class="movie-title movie-title-padding" title="">
                                                                {{movie.movieCnName}}
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </a>
                                            <div class="moive-btn">
                                                <div class="movies-detail movie-detail-strong movie-sale">
                                                    <a class="active"
                                                       @click="changeOperateCard('update',movie.movieId)">修改</a>
                                                </div>
                                                <div class="movies-detail movie-detail-strong movie-sale">
                                                    <span id="deleteId" style="display:none;"></span>
                                                    <a class="active" @click="deleteMovie(movie.movieId)">删除</a>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div v-show="operateCard=='add'">
                        <!--面包屑-->
                        <el-breadcrumb separator-class="el-icon-arrow-right">
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('index')">首页</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>添加电影</el-breadcrumb-item>
                        </el-breadcrumb>
                        <!--占位符-->
                        <div style="margin-top: 25px"></div>

                        <el-button type="success" plain @click="addMovie">提交</el-button>
                        <el-button type="info" plain icon="el-icon-circle-plus-outline" @click="addActorNum">演职列表
                        </el-button>
                        <el-button type="primary" plain icon="el-icon-circle-plus-outline"
                                   @click="changeOperateCard('actor')">演员
                        </el-button>
                        <el-button type="primary" plain icon="el-icon-circle-plus-outline"
                                   @click="changeOperateCard('dire')">导演
                        </el-button>
                        <el-button type="primary" plain icon="el-icon-circle-plus-outline"
                                   @click="changeOperateCard('type')">影片类型
                        </el-button>
                        <el-button type="primary" plain icon="el-icon-circle-plus-outline"
                                   @click="changeOperateCard('country')">制片地区
                        </el-button>

                        <!--占位符-->
                        <div style="margin-top: 25px"></div>

                        <h3 class="addusertitle">电影信息</h3>
                        <div class="textside">
                            <div class="layui-form-item">
                                <label class="layui-form-label">电影名</label>
                                <div class="layui-input-block addusertext">
                                    <input type="text" class="layui-input" v-model="movie.movieCnName">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">电影外名</label>
                                <div class="layui-input-block addusertext">
                                    <input type="text" class="layui-input" v-model="movie.movieFgName">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">导演</label>
                                <div class="layui-input-block addusertext">
                                    <select type="text" class="layui-select" style="width: 270px"
                                            @click="changeMovieDirector($event.target)">
                                        <option v-show="movie.movieDirectorId==''">请选择导演人</option>
                                        <option v-for="d in directorList" :value="d.directorId">{{d.directorName}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div v-show="selectActor.length!=0">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">影片主演</label>
                                    <div class="layui-input-block addusertext">
                                        <select id="movieStar" type="text" class="layui-select" style="width: 160px"
                                                @change="changeMovieStar($event.target)">
                                            <option v-show="movie.movieStarName==''">请选择主演</option>
                                            <option v-for="a in selectActor" v-if="!movie.excludeStar.includes(a)">
                                                {{a}}
                                            </option>
                                        </select>
                                        <el-button type="danger" icon="el-icon-delete" plain style="margin-left: 10px"
                                                   @click="clearMovieStar">清空
                                        </el-button>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">主演详情</label>
                                    <div class="layui-input-block addusertext">
                                        <textarea class="layui-textarea" readonly="readonly"
                                                  :value="movie.movieStarName"></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item" v-for="index of movie.actorNum">
                                <div v-if="!movie.excludeIndex.includes(index)">
                                    <label class="layui-form-label" style="display:inline-block;">演职人员</label>
                                    <div class="layui-input-block addusertext"
                                         style="display:inline-block; margin-left: 10px !important; width: 118px;">
                                        <select type="text" class="layui-select" style="width: 120px" name="actorName"
                                                @change="initActorData(true)">
                                            <option v-show="selectActor.length==0">请选择演员</option>
                                            <option v-for="a in actorList" v-show="!selectActor.includes(a.actorName)">
                                                {{a.actorName}}
                                            </option>
                                        </select>
                                    </div>
                                    <span style="margin-left:10px">饰</span>
                                    <div class="layui-input-block addusertext"
                                         style="display:inline-block; margin-left: 10px !important; width: 118px;">
                                        <input type="text" class="layui-input" name="movieRole">
                                    </div>
                                    <el-button size="mini" type="danger" icon="el-icon-delete" circle
                                               @click="removeActor(index)"></el-button>
                                    <!--<button type="button" class="layui-btn layui-btn-xs"-->
                                    <!--@click="removeActor(index)">-</button>-->
                                </div>
                            </div>
                            <div class="layui-form-item temp">
                                <label class="layui-form-label">电影详情</label>
                                <div class="layui-input-block addusertext">
                                    <textarea class="layui-textarea" v-model="movie.movieExplain"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">电影时长</label>
                                <div class="layui-input-block addusertext"
                                     style="display:inline-block; margin-left: 10px !important; width: 210px;">
                                    <input type="number" autocomplete="off" class="layui-input"
                                           v-model="movie.movieDuration">
                                </div>
                                <span style="margin-left:10px">分钟</span>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">电影类型</label>
                                <div class="layui-input-block addusertext">
                                    <select id="add-MovieType" type="text" class="layui-select" style="width: 160px"
                                            @change="changeMovieType($event.target)">
                                        <option v-show="movie.movieType==''">请选择类型</option>
                                        <option v-for="type in typeList"
                                                v-show="!movie.excludeType.includes(type.typeName)">
                                            {{type.typeName}}
                                        </option>
                                    </select>
                                    <el-button type="danger" icon="el-icon-delete" plain style="margin-left: 10px"
                                               @click="clearMovieType">清空
                                    </el-button>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">类型详情</label>
                                <div class="layui-input-block addusertext">
                                    <textarea class="layui-textarea" readonly="readonly"
                                              :value="movie.movieType"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">上映时间</label>
                                <div class="layui-input-block addusertext">
                                    <input type="date" class="layui-input" v-model="movie.movieReleaseDate">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">制片地区</label>
                                <div class="layui-input-block addusertext">
                                    <select type="text" class="layui-select" style="width: 270px"
                                            @click="changeMovieCountry($event.target)">
                                        <option v-show="movie.movieCountry==''">请选择制片地区</option>
                                        <option v-for="c in countryList" v-show="movie.movieCountry!=c.countryName">
                                            {{c.countryName}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="pictureside">
                            <div class="layui-upload">
                                <p class="movie-picture">电影海报</p>
                                <div class="layui-upload-list">
                                    <img class="layui-upload-img" id="imgId-add">
                                    <p id="demoText"></p>
                                </div>
                                <a href="" class="file">选择文件
                                    <input type="file" accept="image/*" id="addFile" @change="showMovieImg('addFile')">
                                </a>
                            </div>
                        </div>
                    </div>
                    <div v-show="operateCard=='actor'">
                        <!--面包屑-->
                        <el-breadcrumb separator-class="el-icon-arrow-right">
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('index')">首页</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('add')">添加电影</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>新增演员</el-breadcrumb-item>
                        </el-breadcrumb>

                        <!--占位符-->
                        <div style="margin-top: 25px"></div>
                        <el-button type="success" plain @click="addActor">提交</el-button>

                        <h3 class="addusertitle">演员信息</h3>

                        <!--占位符-->
                        <div style="margin-top: 100px"></div>

                        <div class="textside">
                            <div class="layui-form-item">
                                <label class="layui-form-label">姓名</label>
                                <div class="layui-input-block addusertext">
                                    <input type="text" class="layui-input" v-model="actor.actorName">
                                </div>
                            </div>
                        </div>
                        <div class="pictureside">
                            <div class="layui-upload">
                                <p class="movie-picture">演员写真</p>
                                <div class="layui-upload-list">
                                    <img class="layui-upload-img" id="img-actor">
                                    <p id="actorText"></p>
                                </div>
                                <a href="" class="file">选择文件
                                    <input type="file" accept="image/*" id="addActorImg"
                                           @change="showMovieImg('addActorImg')">
                                </a>
                            </div>
                        </div>
                    </div>
                    <div v-show="operateCard=='dire'">
                        <!--面包屑-->
                        <el-breadcrumb separator-class="el-icon-arrow-right">
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('index')">首页</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('add')">添加电影</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>新增导演</el-breadcrumb-item>
                        </el-breadcrumb>

                        <!--占位符-->
                        <div style="margin-top: 25px"></div>
                        <el-button type="success" plain @click="addDirector">提交</el-button>

                        <h3 class="addusertitle">导演信息</h3>

                        <!--占位符-->
                        <div style="margin-top: 100px"></div>

                        <div class="textside">
                            <div class="layui-form-item">
                                <label class="layui-form-label">姓名</label>
                                <div class="layui-input-block addusertext">
                                    <input type="text" class="layui-input" v-model="director.directorName">
                                </div>
                            </div>
                        </div>
                        <div class="pictureside">
                            <div class="layui-upload">
                                <p class="movie-picture">导演写真</p>
                                <div class="layui-upload-list">
                                    <img class="layui-upload-img" id="img-dire">
                                    <p id="direText"></p>
                                </div>
                                <a href="" class="file">选择文件
                                    <input type="file" accept="image/*" id="addDireImg"
                                           @change="showMovieImg('addDireImg')">
                                </a>
                            </div>
                        </div>
                    </div>
                    <div v-show="operateCard=='type'">
                        <!--面包屑-->
                        <el-breadcrumb separator-class="el-icon-arrow-right">
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('index')">首页</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('add')">添加电影</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>新增影片类型</el-breadcrumb-item>
                        </el-breadcrumb>

                        <!--占位符-->
                        <div style="margin-top: 25px"></div>
                        <el-button type="success" plain @click="addMovieType">提交</el-button>

                        <h3 class="addusertitle">影片类型</h3>

                        <!--占位符-->
                        <div style="margin-top: 100px"></div>

                        <div class="textside">
                            <div class="layui-form-item">
                                <label class="layui-form-label">类型</label>
                                <div class="layui-input-block addusertext">
                                    <input type="text" class="layui-input" v-model="movieType.typeName">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div v-show="operateCard=='country'">
                        <!--面包屑-->
                        <el-breadcrumb separator-class="el-icon-arrow-right">
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('index')">首页</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('add')">添加电影</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>新增制片区域</el-breadcrumb-item>
                        </el-breadcrumb>

                        <!--占位符-->
                        <div style="margin-top: 25px"></div>
                        <el-button type="success" plain @click="addMovieCountry">提交</el-button>

                        <h3 class="addusertitle">制片区域</h3>

                        <!--占位符-->
                        <div style="margin-top: 100px"></div>

                        <div class="textside">
                            <div class="layui-form-item">
                                <label class="layui-form-label">区域</label>
                                <div class="layui-input-block addusertext">
                                    <input type="text" class="layui-input" v-model="country.countryName">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div v-show="operateCard=='update'">
                        <!--面包屑-->
                        <el-breadcrumb separator-class="el-icon-arrow-right">
                            <el-breadcrumb-item>
                                <el-link type="primary" @click="changeOperateCard('index')">首页</el-link>
                            </el-breadcrumb-item>
                            <el-breadcrumb-item>修改电影</el-breadcrumb-item>
                        </el-breadcrumb>
                        <!--占位符-->
                        <div style="margin-top: 25px"></div>

                        <el-button type="success" plain @click="updateToMovie">保存</el-button>

                        <!--占位符-->
                        <div style="margin-top: 25px"></div>

                        <h3 class="addusertitle">电影信息</h3>
                        <div class="textside">
                            <div class="layui-form-item">
                                <label class="layui-form-label">电影名</label>
                                <div class="layui-input-block addusertext">
                                    <input type="text" class="layui-input" v-model="updateMovie.movie.movieCnName">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">电影外名</label>
                                <div class="layui-input-block addusertext">
                                    <input type="text" class="layui-input" v-model="updateMovie.movie.movieFgName">
                                </div>
                            </div>
                            <div class="layui-form-item" v-for="(name,index) in updateMovie.movie.actorNames">
                                <div>
                                    <label class="layui-form-label" style="display:inline-block;">饰演表</label>
                                    <div class="layui-input-block addusertext"
                                         style="color: #a6e1ec; display:inline-block; margin-left: 10px !important; width: 118px;">
                                        <input type="text" class="layui-input" :value="name" readonly>
                                    </div>
                                    <span style="margin-left:10px">饰</span>
                                    <div class="layui-input-block addusertext"
                                         style="color: #a6e1ec; display:inline-block; margin-left: 10px !important; width: 118px;">
                                        <input type="text" class="layui-input"
                                               :value="updateMovie.movie.actorRoles[index].actorRole" readonly>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item temp">
                                <label class="layui-form-label">电影详情</label>
                                <div class="layui-input-block addusertext">
                                    <textarea class="layui-textarea"
                                              v-model="updateMovie.movie.movieExplain"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">电影时长</label>
                                <div class="layui-input-block addusertext"
                                     style="display:inline-block; margin-left: 10px !important; width: 210px;">
                                    <input type="number" autocomplete="off" class="layui-input"
                                           v-model="updateMovie.movie.movieDuration">
                                </div>
                                <span style="margin-left:10px">分钟</span>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">电影类型</label>
                                <div class="layui-input-block addusertext">
                                    <select id="update-MovieType" type="text" class="layui-select" style="width: 160px"
                                            @change="updateMovieType($event.target)">
                                        <option v-show="updateMovie.movie.movieType==''">请选择类型</option>
                                        <option v-for="type in typeList"
                                                v-show="!updateMovie.excludeType.includes(type.typeName)">
                                            {{type.typeName}}
                                        </option>
                                    </select>
                                    <el-button type="danger" icon="el-icon-delete" plain style="margin-left: 10px"
                                               @click="clearMovieTypeOfUpdate">清空
                                    </el-button>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">类型详情</label>
                                <div class="layui-input-block addusertext">
                                    <textarea class="layui-textarea" readonly="readonly"
                                              :value="updateMovie.movie.movieType"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">上映时间</label>
                                <div class="layui-input-block addusertext">
                                    <input type="date" class="layui-input" v-model="updateMovie.movie.movieReleaseDate">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">制片地区</label>
                                <div class="layui-input-block addusertext">
                                    <select type="text" class="layui-select" style="width: 270px"
                                            v-model="updateMovie.movie.movieCountry">
                                        <option v-for="c in countryList"
                                                v-show="updateMovie.movie.movieCountry!=c.countryName">
                                            {{c.countryName}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">影片评分</label>
                                <div class="layui-input-block addusertext"
                                     style="display:inline-block; margin-left: 10px !important; width: 210px;">
                                    <input type="number" step="0.5" autocomplete="off" class="layui-input"
                                           v-model="updateMovie.movie.movieScore">
                                </div>
                                <span style="margin-left:10px">分</span>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">影片状态</label>
                                <div class="layui-input-block addusertext">
                                    <select type="text" class="layui-select" style="width: 270px"
                                            v-model="updateMovie.movie.movieState">
                                        <option value="1">在线</option>
                                        <option value="0">下架</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="pictureside">
                            <div class="layui-upload">
                                <p class="movie-picture">电影海报</p>
                                <div class="layui-upload-list">
                                    <img :src="updateMovie.movie.moviePicture" class="layui-upload-img"
                                         id="imgId-update">
                                    <p id="updateText"></p>
                                </div>
                                <a href="" class="file">选择文件
                                    <input type="file" accept="image/*" id="updateFile"
                                           @change="showMovieImg('updateFile')">
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--加载页头-->
<script>
    // 当文档加载完成后执行
    $(document).ready(function () {
        // 加载页头
        $("#header").load("header.html")
    });
</script>

<script>
    axios.defaults.baseURL = axios_url.adminBaseURL;
    var vueapp = new Vue({
        el: "#movie-vue",
        data: {
            movies: '',                 // 记录当前页所有的热点影片
            operateCard: 'index',       // 显示的卡片功能 'index'表示主界面，'add'表示添加, 'update'表示修改等
            movie: {
                movieCnName: '',
                movieFgName: '',
                movieActor: [],             // '饰演列表(演员与饰演的角色)'
                movieDirectorId: 0,         // '关联的导演ID'
                movieStar: [],              // '影片主演的ID集'
                movieActorIds: [],          // '关联的所有演员ID'
                movieExplain: '',           // '电影详情'
                movieDuration: '',          // '电影时长'
                movieReleaseDate: '',       // '上映时间'
                movieCountry: '',           // '制片地区'
                movieType: '',              // '影片类型'

                actorNum: 1,                // 演职人员的列表数量（用于控制演员饰演列表的数量）
                excludeIndex: [],           // 记录饰演列表被移除掉的索引（选中后将不再展示到演员的下拉框）
                excludeType: [],            // 记录已经选中的影片类型（选中后将不再展示到类型下拉框）
                excludeStar: [],            // 记录已经选中的主演名称（选中后将不再展示到主演下拉框）
                movieStarName: '',          // 记录影片主演的名字(仅用于页面展示已经选中的主演)
            },
            updateMovie: {
                movie: '',                  // 根据ID查询到的影片信息
                excludeType: [],            // 记录已经选中的影片类型（选中后将不再展示到类型下拉框）
            },
            actor: {
                actorName: '',              // '演员姓名'
            },
            director: {
                directorName: '',           // '导演姓名'
            },
            country: {
                countryName: '',            // '区域名称'
            },
            movieType: {
                typeName: '',               // '影片类型'
            },
            directorList: [],           // 记录所有的导演信息
            actorList: [],              // 记录所有的演员信息
            selectActor: [],            // 记录出演的的演员
            typeList: [],               // 记录所有的影片类型
            countryList: [],            // 记录所有的制片地区

            page: "",					// 分页参数
            value: true,				// 是否开启分页隐藏功能
            pageSizes: [4, 8, 12],		// 每页条数选项列表
            pagerCount: 5				// 导航按钮数
        },
        watch: {
            // 监听卡片的变化
            "operateCard": movie_yh_service.watchCard,
        },
        methods: {
            findMovieById: movie_yh_controller.findMovieById,
            findMovieAll: movie_yh_controller.findMovieAll,
            moviePreheat: movie_yh_controller.moviePreheat,
            addMovie: movie_yh_controller.addMovie,
            updateToMovie: movie_yh_controller.updateToMovie,
            deleteMovie: movie_yh_controller.deleteMovie,
            addActor: movie_yh_controller.addActor,
            addDirector: movie_yh_controller.addDirector,
            addMovieCountry: movie_yh_controller.addMovieCountry,
            addMovieType: movie_yh_controller.addMovieType,
            findDirectorAll: movie_yh_controller.findDirectorAll,
            findActorAll: movie_yh_controller.findActorAll,
            findMovieTypeAll: movie_yh_controller.findMovieTypeAll,
            findMovieCountryAll: movie_yh_controller.findMovieCountryAll,

            changeOperateCard: movie_yh_service.changeOperateCard,
            addActorNum: movie_yh_service.addActorNum,
            removeActor: movie_yh_service.removeActor,
            initActorData: movie_yh_service.initActorData,
            changeMovieType: movie_yh_service.changeMovieType,
            updateMovieType: movie_yh_service.updateMovieType,
            clearMovieTypeOfUpdate: movie_yh_service.clearMovieTypeOfUpdate,
            changeMovieStar: movie_yh_service.changeMovieStar,
            changeMovieCountry: movie_yh_service.changeMovieCountry,
            changeMovieDirector: movie_yh_service.changeMovieDirector,
            clearMovieType: movie_yh_service.clearMovieType,
            clearMovieStar: movie_yh_service.clearMovieStar,
            showMovieImg: movie_yh_service.showMovieImg,
            resetMovieStar: movie_yh_service.resetMovieStar,
            resetMovieType: movie_yh_service.resetMovieType,

            // 分页功能 改变下拉框中每页的记录数时触发
            handleSizeChange: movie_yh_service.handleSizeChange,
            // 分页功能 点击导航按钮时触发
            handleCurrentChange: movie_yh_service.handleCurrentChange,
        },
        created: movie_yh_service.created,
    })
</script>
</body>

</html>